cmake_minimum_required (VERSION 2.8)

project (tian)
SET( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake.modules )
LINK_DIRECTORIES(/opt/local/lib)

set (SRCS hwt.c bitstream.c
  encode/embed.c encode/encode.c decode/deembed.c decode/decode.c
  parameters.c driver.c
  huffman/huffman.c md5/md5.c
  )
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

FIND_PACKAGE(OpenCV REQUIRED)

add_executable (tian ${SRCS})
TARGET_LINK_LIBRARIES(tian ${OpenCV_LIBS} jbig)
set(CMAKE_C_FLAGS_DEBUG "-DDEBUG -DCAPACITY -Wall")
set(CMAKE_C_FLAGS_RELEASE "-DCAPACITY")

set(CMAKE_BUILD_TYPE Debug)
#set(CMAKE_BUILD_TYPE Release)
